﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PokerRotation : MonoBehaviour {


    private float degree = 0;
    private Transform goImgBack;
	// Use this for initialization
	void Start () {
        goImgBack = this.transform.Find("imgBack");
	}
	
	// Update is called once per frame
	void Update () {
        degree += Time.deltaTime * 100;
        degree %= 360;
        this.transform.localRotation = Quaternion.Euler(0, degree, 0);

        if (degree > 90 && degree < 270) {
            goImgBack.gameObject.SetActive(true);
        } else {
            goImgBack.gameObject.SetActive(false);
        }
	}
}
